using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using LoggingClient;

namespace DeviceManager.Testing
{
    public partial class TestingForm : Form
    {
        public TestingForm()
        {
            InitializeComponent();

            DeviceManager.Common.DMLogger.Instance.Info("Device Manager Testing");
        }

        TestingJournalPrinter JournalTesting = new TestingJournalPrinter();

        private void BTN_JournalPrinter_OpenConnection_Click(object sender, EventArgs e)
        {
            JournalTesting.JournalPrinter.OpenConnection();
        }

        private void BTN_JournalPrinter_Print_Click(object sender, EventArgs e)
        {
            string SingleLineForm = "JRNL MSG";
            string SingleLineFormField = "MSG";

            string thisLine = "Hello World!";

            thisLine.Replace("<", "\\<");
            thisLine = thisLine.Replace(">", "\\>");

            string fieldValues = SingleLineFormField + "=<" + thisLine + ">";


            JournalTesting.JournalPrinter.PrintToPaperJournal(SingleLineForm, fieldValues);
        }

        private void BTN_JournalPrinter_CloseConnection_Click(object sender, EventArgs e)
        {
            JournalTesting.JournalPrinter.CloseConnection();
        }


    }
}